package constant.milk.cashbook.asset;

import constant.milk.cashbook.R;
import constant.milk.cashbook.SuperActivity;
import constant.milk.cashbook.asset.bank.BankActivity;
import constant.milk.cashbook.asset.check.CheckActivity;
import constant.milk.cashbook.asset.credit.CreditActivity;
import constant.milk.cashbook.asset.gift.GiftActivity;
import constant.milk.cashbook.asset.phone.PhoneActivity;
import constant.milk.cashbook.asset.real.RealActivity;
import constant.milk.cashbook.tip.TipMap;
import constant.milk.cashbook.tip.TipInfoActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class AssetActivity extends SuperActivity
{
	private View realView;
	private View bankView;
	private View checkCardView;
	private View creditCardView;
	private View phoneView;
	private View giftCardView;
	
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.asset_activity);
		
		setTitle("자산관리");
		
		setFindViewId();
		setOnClick();
		setData();
	}

	@Override
	protected void setFindViewId()
	{
		realView = findViewById(R.id.assetRealView);
		bankView = findViewById(R.id.assetBankView);
		checkCardView = findViewById(R.id.assetCheckCardView);
		creditCardView = findViewById(R.id.assetCreditCardView);
		phoneView = findViewById(R.id.assetPhoneView);
		giftCardView = findViewById(R.id.assetGiftCardView);
	}

	@Override
	protected void setOnClick()
	{
		realView.setOnClickListener(new OnClickListener()
		{
			@Override
			public void onClick(View v)
			{
				Intent intent = new Intent(superContext, RealActivity.class);
				startActivity(intent);
			}
		});
		
		bankView.setOnClickListener(new OnClickListener()
		{
			@Override
			public void onClick(View v)
			{
				Intent intent = new Intent(superContext, BankActivity.class);
				startActivity(intent);
			}
		});
		
		checkCardView.setOnClickListener(new OnClickListener()
		{
			@Override
			public void onClick(View v)
			{
				Intent intent = new Intent(superContext, CheckActivity.class);
				startActivity(intent);
			}
		});
		
		creditCardView.setOnClickListener(new OnClickListener()
		{
			@Override
			public void onClick(View v)
			{
				Intent intent = new Intent(superContext, CreditActivity.class);
				startActivity(intent);
			}
		});
		
		phoneView.setOnClickListener(new OnClickListener()
		{
			@Override
			public void onClick(View v)
			{
				Intent intent = new Intent(superContext, PhoneActivity.class);
				startActivity(intent);
			}
		});
		
		giftCardView.setOnClickListener(new OnClickListener()
		{
			@Override
			public void onClick(View v)
			{
				Intent intent = new Intent(superContext, GiftActivity.class);
				startActivity(intent);
			}
		});
	}

	@Override
	protected void setData()
	{
	}

	@Override
	protected void tipButton()
	{
		Intent intent = new Intent(superContext, TipInfoActivity.class);
		intent.putExtra(TipInfoActivity.TIP_ID, TipMap.TIP_ASSET);
		startActivity(intent);
	}

}
